var app = new Vue({
	el: "#today_weather",
	data: {
		todayinfo: "",
		sevendayinfo: "",
		province:""
	},
	mounted: function() {
		/*获取当天的天气数据*/
		var that = this;
		axios.get('https://tianqiapi.com/api?version=v6&appid=73788829&appsecret=OQgvBbE1') /*数据请求网址*/
			.then(function(response) {
				console.log(response.data);
				that.todayinfo = response.data;
				/*根据得到的城市名称获取省份*/
				var city = response.data.city + "市";
		/*		provinces.forEach((item,index)=>{
					item.city.forEach((itt,idx)=>{
						if(city == itt.name){
							console.log("当前城市:"+city+"位于"+item.name);
						}
					})
				})*/
				that.province = item.name;
			})
			.catch(function(error) {
				console.log(error);
			});
	}
});